﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display.hud {
    import flash.events.*;
    import flash.display.*;
    import Engine.Helpers.*;
    import org.aswing.*;
    import flash.filters.*;
    import Display.MarketUI.*;
    import org.aswing.border.*;
    import Display.aswingui.*;

    public class ExpandedMenu extends JWindow {

        protected const glow_btn:GlowFilter;
        protected const glow_lbl:GlowFilter;

        protected var m_bg:DisplayObject;
        protected var m_content:JPanel;
        protected var m_contentCount:int;

        public function ExpandedMenu(_arg1=null, _arg2:Boolean=false){
            this.glow_btn = new GlowFilter(0xFFFF00, 1, 2, 2, 10);
            this.glow_lbl = new GlowFilter(0x999900, 1, 2, 2, 10);
            super(_arg1, _arg2);
            this.makeContent();
            this.setContentPane(this.m_content);
            ASwingHelper.prepare(this);
            addEventListener(MouseEvent.MOUSE_OVER, this.onMaskSlotLadder);
            addEventListener(MouseEvent.MOUSE_MOVE, this.onMaskSlotLadder);
            addEventListener(MouseEvent.MOUSE_OUT, this.onMaskSlotLadder);
        }
        public function onMaskSlotLadder(_arg1:MouseEvent):void{
            _arg1.stopImmediatePropagation();
            _arg1.stopPropagation();
        }
        protected function makeButton(_arg1:Class, _arg2:JButton, _arg3:JLabel=null):void{
            var _local4:DisplayObject = (new (_arg1)() as DisplayObject);
            var _local5:DisplayObject = (new (_arg1)() as DisplayObject);
            _local5.filters = [this.glow_btn];
            var _local6:SimpleButton = new SimpleButton(_local4, _local5, _local4, _local4);
            _arg2.wrapSimpleButton(_local6);
            if (_arg3){
                _arg3.setFont(ASwingHelper.getBoldFont(12));
                _arg3.setForeground(ASwingHelper.getWhite());
                _arg3.setHeight(10);
                _arg3.setBorder(new EmptyBorder(null, null));
                this.m_content.appendAll(_arg2, _arg3);
            } else {
                this.m_content.appendAll(_arg2);
            };
            this.m_contentCount++;
        }
        protected function attachButtonHandlers(_arg1:JButton, _arg2:Function, _arg3:Function=null, _arg4:Function=null):void{
            _arg1.addActionListener(_arg2, 0, true);
            if (_arg3 != null){
                _arg1.addEventListener(MouseEvent.MOUSE_OVER, _arg3, false, 0, true);
            };
            if (_arg4 != null){
                _arg1.addEventListener(MouseEvent.MOUSE_OUT, _arg4, false, 0, true);
            };
        }
        protected function makeContent():void{
        }
        public function getDesiredPosition(_arg1:Catalog=null):Vector2{
            if (_arg1){
                return (_arg1.getExpandedMainMenuPosition());
            };
            if (this.m_contentCount == 5){
                return (new Vector2(635, 154));
            };
            return (new Vector2(635, 210));
        }

    }
}//package Display.hud 
